#ifndef __TRANSLATE_H_
#define __TRANSLATE_H_



#ifndef _WINDOWS

#define DECLSPEC_EXPORT			
#define DECLSPEC_IMPORT			
#define SOCKET                  int
#define SOCKLEN_T				socklen_t
#define SOCKET_NULL             -1
#define SOCKET_CREATE           socket
#define SOCKET_CHECK(X)         (0 > X) ? 1 : 0
#define SOCKET_CONNECT          connect
#define SOCKET_BING             bind
#define SOCKET_LISTEN           listen
#define SOCKET_ACCEPT           accept
#define SOCKET_TCP_SEND         send
#define SOCKET_TCP_RECV         recv
#define SOCKET_UDP_SEND         sendto
#define SOCKET_UDP_RECV         recvfrom
#define SOCKET_CLOSE            close
#define SOCKLEN_T				socklen_t
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>

#else

#define DECLSPEC_EXPORT			__declspec(dllexport)
#define DECLSPEC_IMPORT			__declspec(dllimport)
#define SOCKET                  SOCKET
#define SOCKLEN_T				int
#define SOCKET_NULL             NULL
#define SOCKET_CREATE           socket
#define SOCKET_CHECK(X)         (X == INVALID_SOCKET) ? 1 : 0
#define SOCKET_CONNECT          connect
#define SOCKET_BING             bind
#define SOCKET_LISTEN           listen
#define SOCKET_ACCEPT           accept
#define SOCKET_TCP_SEND         send
#define SOCKET_TCP_RECV         recv
#define SOCKET_UDP_SEND         sendto
#define SOCKET_UDP_RECV         recvfrom
#define SOCKET_CLOSE            closesocket
#define SOCKLEN_T				int
#include <WinSock2.h>

#endif // __LINUX__

#ifdef _USRDLL
#define DECLSPEC				DECLSPEC_EXPORT
#else
#define DECLSPEC				DECLSPEC_IMPORT
#endif // _USRDLL

#include <memory.h>
#include <string>
#include <vector>

#define NETDEBUG_BUFF_SIZE 2048

#endif // !__TRANSLATE_H_